//
//  BaseModel.m
//  BobNews
//
//  Created by lanou3g on 16/5/6.
//  Copyright © 2016年 YJC. All rights reserved.
//

#import "BaseModel.h"
#import "MulImageViewModel.h"
#import "HeadImageModel.h"

@implementation BaseModel
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}
+ (instancetype)modelWithDictionary:(NSDictionary *)dictionary {
    NSString *talkContent = dictionary[@"talkContent"];
    if (talkContent) {
        HeadImageModel *headModel = [[HeadImageModel alloc]init];
        [headModel setValuesForKeysWithDictionary:dictionary];
        return headModel;
    }else {
        MulImageViewModel *mulModel = [[MulImageViewModel alloc]init];
        [mulModel setValuesForKeysWithDictionary:dictionary];
        return mulModel;
    }
    return nil;
}
@end
